import request from '@/utils/request'

/**
 * 根据条件查询简历列表
 * @param query
 * @returns {AxiosPromise}
 */
export function fetchResumeList(query) {
  return request({
    url: 'resume/center',
    method: 'post',
    params: query
  })
}

/**
 * 根据当前登录用户以及查询条件查询指定简历
 * @param query
 * @returns {AxiosPromise}
 */
export function fetchResumeListByRequest(query) {
  return request({
    url: 'resume/get',
    method: 'post',
    params: query
  })
}

/**
 * 将简历状态设置为有意向
 * @param query
 * @returns {AxiosPromise}
 */
export function acceptResume(query) {
  return request({
    url: 'resume/accept',
    method: 'post',
    params: query
  })
}

/**
 * 将简历状态设置为无意向
 * @param query
 * @returns {AxiosPromise}
 */
export function rejectResume(query) {
  return request({
    url: 'resume/reject',
    method: 'post',
    params: query
  })
}

/**
 * 获取简历信息
 * @param query
 * @returns {AxiosPromise}
 */
export function getResumeInfo(query) {
  return request({
    url: 'resume/find',
    method: 'post',
    params: query
  })
}

/**
 * 获取简历信息
 * @param query
 * @returns {AxiosPromise}
 */
export function employerViewResume(query) {
  return request({
    url: 'employer/view/resume',
    method: 'post',
    params: query
  })
}
